import os
from dotenv import load_dotenv
from openai import OpenAI
load_dotenv(override=True)
DEEPSEEK_API_KEY=os.getenv("DEEPSEEK_API_KEY")

client=OpenAI(api_key=DEEPSEEK_API_KEY,base_url="https://api.deepseek.com")

response=client.chat.completions.create(
    model="deepseek-chat",
    messages=[
        {"role": "system", "content": "你是一个乐于助人的助手，请根据用户的问题给出回答"},
        {"role": "user", "content": "你好，请介绍一下你自己"}
    ],

)
if __name__ == '__main__':
    print(response.choices[0].message.content)